﻿using DiffuseEnjoyIdle.Core.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace System.Linq
{
    /// <summary>
    ///不包含
    /// </summary>
    public sealed class ExpBuilderExc : ExpressionBuilderInclude, IExpressionBuilder
    {
        public ExpBuilderExc()
        {
            base.OpType = Enum_ConditionType.Exc;
            base.EndKey = Enum_ConditionType.Exc.ToString();
        }

        protected override Expression GenExp(Expression left, Expression right)
        {
            MethodInfo methodInfo = GetMethodInfo(right.Type.GetElementType());
            return Expression.Not(Expression.Call(null, methodInfo, right, left));
        }
    }
}